package com.upcode.weighing.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * 机构状态枚举
 */
public enum OrgStatusEnum {

    ACTIVE("1","启用"),
    FORBIDDEN("0","禁用");

    private String value;
    private String msg;

    OrgStatusEnum(String value, String dec) {
        this.value = value;
        this.msg = dec;
    }

    public String getValue() {
        return value;
    }

    public String getMsg() {
        return msg;
    }

    public static String getMsg(String value) {
        if (StringUtils.isBlank(value)) {
            return "";
        }
        for (OrgStatusEnum u : OrgStatusEnum.values()) {
            if (u.getValue().equals(value)) {
                return u.msg;
            }
        }
        return "";
    }
}
